package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.custom.AjaxResult;
import com.example.demo.custom.BaseController;
import com.example.demo.entity.TwoNetwork;
import com.example.demo.form.TwoNetworkForm;
import com.example.demo.service.TwoNetworkService;

@RestController
@RequestMapping(value = "/twonetwork")
public class TwoNetworkController  extends BaseController<TwoNetwork, Integer, TwoNetworkForm>{
	@Autowired
	TwoNetworkService twoDao;
	
	@RequestMapping(value="/findbyId")
	public Object byId(TwoNetworkForm form) {
		TwoNetwork model = null;
		Integer id = form.getId();
		if(id!=null) {
			 model = twoDao.findById(id);
		}	
		return new AjaxResult(model);
		
	}
}
